home *** CD-ROM | disk | FTP | other *** search
- /* stdio.lib
-
- Copyright (C) 1980, M J Maney
-
- First created 3/15/80
- Last revised 3/15/80
-
- This library provides the defines and data declarations for the
- stdio functions, which are an attempt to simulate some of the
- things that a really nice OS (like UNIX) gives you in a less nice
- enviornment (BDS C running under CP/M).
-
- To work properly, this file MUST be included into the source of
- any program that wants to use the stdio functions, and the
- library file csym.lib must also be included. These two files
- MUST be the first two files included, and they MUST be included
- in the sequence
-
- #include "csym.lib"
- #include "stdio.lib"
-
- BEFORE any inline declarations of external (global) variables,
- and that includes any such declarations in any other file which
- is included! To be safe, just make the above two lines the first
- non-comment lines of the source. NB that they must be included
- in ALL source files for the program that declare globals!!
- */
-
- /* define STDIN and STDOUT to work with getc & putc ONLY */
- #define STDIN (_stdin==FILE ? _inpbuf : 0)
- #define STDOUT (_stdout==FILE ? _outbuf : 1)
-
- /* declare globals for stdio functions */
- char _stdin,_stdout;
- char _inpbuf[IOBUFSIZ],_outbuf[IOBUFSIZ];
- char _inpname[FNAMSIZ],_outname[FNAMSIZ];
- int _inpfd,_outfd;
- char _filter;